<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

    <f:view contentType="text/html">
        <h:head>
            <f:facet name="first">
                <meta content='text/html; charset=UTF-8' http-equiv="Content-Type"/>
                <title>Bajlam System</title>
            </f:facet>
        </h:head>

        <h:body>

            <p:layout fullPage="true">

                <p:layoutUnit position="north" size="100" resizable="true" closable="true" collapsible="true">
                 <p align="center">CONTABILIDAD</p> 
                </p:layoutUnit>

                <p:layoutUnit position="south" size="100" closable="true" collapsible="true">
                    <p align="center">DIARIO</p>
                </p:layoutUnit>

                <p:layoutUnit position="west" size="200" header="MENU" collapsible="true">
                    <p:menu>
                         <p:submenu label="Diario">
                            <p:menuitem value="Catalogo de Cuentas" outcome="catalogo" />
                            <p:menuitem value="Inventario" outcome="inventario" />
                            <p:menuitem value="Estado de Resultados" outcome="estado" />
                            <p:menuitem value="Balance General" outcome="balance" />
                            
                        </p:submenu>

                    </p:menu>
                </p:layoutUnit>

                <p:layoutUnit position="center">
            
                    <!-- Cabecera inicial Selector -->         
     
   <h:form>      
    <p:panel id="panel" header="Bajlam System" style="margin-bottom:10px;">
   
        <!-- inicia boton añadir -->
<p:commandButton value="Añadir" onclick="PF('dlg').show();" type="button" />
 <p:dialog header="Diario" widgetVar="dlg" minimizable="true" maximizable="true">
   <h:outputText value="Asiento de Diario" /> <br />
   <h:outputText value="Ingresar los detalles de la transacción y luego asignar la cantidad de las cuentas" /> <br /><br /><br />
   <h:outputText value="Fecha: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;" />
   <p:calendar id="button" value="#{calendarView.date3}" showOn="button" /><br /><br />
   
   <h:outputLabel for="txt4" value="Libro Diario: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;" />
            <h:selectOneMenu id="txt4" value="#{selectorView.text4}" required="true" label="Text4">
                <f:selectItem itemLabel="General" itemValue="" noSelectionOption="true" />
                <f:selectItem itemLabel="Pagos" itemValue="1" />
                <f:selectItem itemLabel="Ingresos" itemValue="2" />
                <f:selectItem itemLabel="Ventas" itemValue="3" />
                <f:selectItem itemLabel="Compras" itemValue="4" />
            </h:selectOneMenu>
            <p:message for="txt4" />
            <h:outputText value="#{selectorView.text4}" /><br />
   
    <h:outputLabel for="txt4" value="Articulo: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; " /> 
            <p:inputText id="txt5" value="#{selectorView.text5}" required="true" label="Text 5">
                <f:validateLength minimum="4" />
            </p:inputText>
            <p:message for="txt5" />
            <h:outputText value="" /><br />        
            
   <h:outputLabel for="txt4" value="Descripción: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;" /> 
            <p:inputText id="txt5" value="#{selectorView.text5}" required="true" label="Text 5">
                <f:validateLength minimum="4" />
            </p:inputText>
            <p:message for="txt5" />
            <h:outputText value="" /><br /><br />
      
     <h:outputText value="Asignación de cuentas" />        
   
            <!-- Inicia la tabla Data Table Basic -->              
     <p:dataTable var="car" value="#{dtBasicView.cars}">
     
    <p:column headerText="No. Cuenta">
        <h:outputText value="1200" />
    </p:column>

    <p:column headerText="Cuenta">
      <h:outputText value="1200" />  
    </p:column>
         
    <p:column headerText="Importe Debito">
        <h:outputText value="1000" />
    </p:column>
         
    <p:column headerText="Importe Credito">
        <h:outputText value="10" />
    </p:column>
                     
</p:dataTable>
            <p:spacer />
  <!-- Termina la tabla - Data Table Basic -->
  
    <h:panelGrid columns="5">
        <h:outputText value="&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;" />
        <p:commandButton update="@(form)" value="Registrar" />
        <p:commandButton update="@(form:last)" value="Cancelar" />
        <p:commandButton update="@(.ui-panel)" value="Ayuda" />
        <p:commandButton update="@(.ui-panel)" value="Salir" />
    </h:panelGrid>
           
</p:dialog>
        <!-- Finaliza boton añadir -->
        
        <h:panelGrid columns="4">
        <p:commandButton update="@(form)" value="Vista Previa" />
        <p:commandButton update="@(form)" value="Guardar" icon="ui-icon-disk"/>
        <p:commandButton update="@(form:last)" value="Imprimir" icon="ui-icon-print" />
        <p:commandButton update="@(.ui-panel)" value="Correo" icon="ui-icon-mail-closed"/>
    </h:panelGrid>

        <h:panelGrid columns="12" cellpadding="5">
            <h:outputLabel for="txt3" value="Período Fiscal" />
            <h:selectOneMenu id="txt3" value="#{selectorView.text3}" required="true" label="Text 3">
                <f:selectItem itemLabel="2014" itemValue="" noSelectionOption="true" />
                <f:selectItem itemLabel="2013" itemValue="1" />
                <f:selectItem itemLabel="2012" itemValue="2" />
                <f:selectItem itemLabel="2011" itemValue="3" />
            </h:selectOneMenu>
            <p:message for="txt3" />
            <h:outputText value="#{selectorView.text3}" />
            
            <h:outputLabel for="txt1" value="Inicio" />
            <p:inputText id="txt1" value="#{selectorView.text1}" required="true" label="Text 1">
                <f:validateLength minimum="2" />
            </p:inputText>
            <p:message for="txt1" />
            <h:outputText value="#{selectorView.text1}" />
 
            <h:outputLabel for="txt2" value="Final" />
            <p:inputText id="txt2" value="#{selectorView.text2}" required="true" label="Text 2" />
            <p:message for="txt2" />
            <h:outputText value="#{selectorView.text2}" />
 
         </h:panelGrid><br /><br />
   <!-- Finaliza Cabecera inicial Selector -->
   
       <h:panelGrid columns="5">
        <p:commandButton update="@(form)" value="General" />
        <p:commandButton update="@(form:last)" value="Pagos" />
        <p:commandButton update="@(.ui-panel)" value="Ingresos" />
        <p:commandButton process="@(.ui-panel :input)" update="@(.ui-panel)" value="Ventas" />
        <p:commandButton process="@(.ui-panel :input:not(select))" update="@(.ui-panel)" value="Compras" />
    </h:panelGrid>  
      
   <!-- Inicia la tabla Data Table Basic -->              
    <h:form>
   <p:dataTable var="car" value="#{dtBasicView.cars}">
    <p:column headerText="Fecha">
        <h:outputText value="#{car.fecha}" />
    </p:column>
 
    <p:column headerText="Libro Diario">
        <h:outputText value="#{car.diario}" />
    </p:column>
 
    <p:column headerText="Descripcion">
        <h:outputText value="#{car.descripcion}" />
    </p:column>
 
    <p:column headerText="No. Cuenta">
        <h:outputText value="#{car.cuenta}" />
    </p:column>

    <p:column headerText="Cuenta">
        <h:outputText value="#{car.cuenta1}" />
    </p:column>
         
    <p:column headerText="Importe Debito">
        <h:outputText value="#{car.debito}" />
    </p:column>
         
    <p:column headerText="Importe Credito">
        <h:outputText value="#{car.credito}" />
    </p:column>
    
    <p:column headerText="Usuario">
        <h:outputText value="#{car.cuenta}" />
    </p:column>
               
</p:dataTable>
</h:form>
  <!-- Termina la tabla - Data Table Basic --> 
   
    </p:panel>
  </h:form>
    
               
   
         
                    
                    
                    
      
  
                </p:layoutUnit>
 
                
            </p:layout>

        </h:body>

    </f:view>
</html>

